package com.zr.model;
// Generated 2016-6-19 19:35:13 by Hibernate Tools 3.2.2.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TStatus generated by hbm2java
 */
@Entity
@Table(name = "t_status", catalog = "ld_sys")
public class TStatus implements java.io.Serializable {

	private Integer sid;
	private TDistributionpoint TDistributionpoint;
	private String sname;
	private Set<TOrder> TOrders = new HashSet<TOrder>();
	private Set<TOrder> TOrders_1 = new HashSet<TOrder>();

	public TStatus() {
	}

	public TStatus(TDistributionpoint TDistributionpoint, String sname, Set<TOrder> TOrders, Set<TOrder> TOrders_1) {
		this.TDistributionpoint = TDistributionpoint;
		this.sname = sname;
		this.TOrders = TOrders;
		this.TOrders_1 = TOrders_1;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "sid", unique = true, nullable = false)
	public Integer getSid() {
		return this.sid;
	}

	public void setSid(Integer sid) {
		this.sid = sid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dpid")
	public TDistributionpoint getTDistributionpoint() {
		return this.TDistributionpoint;
	}

	public void setTDistributionpoint(TDistributionpoint TDistributionpoint) {
		this.TDistributionpoint = TDistributionpoint;
	}

	@Column(name = "sname")
	public String getSname() {
		return this.sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TStatuses")
	public Set<TOrder> getTOrders() {
		return this.TOrders;
	}

	public void setTOrders(Set<TOrder> TOrders) {
		this.TOrders = TOrders;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TStatus")
	public Set<TOrder> getTOrders_1() {
		return this.TOrders_1;
	}

	public void setTOrders_1(Set<TOrder> TOrders_1) {
		this.TOrders_1 = TOrders_1;
	}

}
